call Send(cr" Your lack of co-operation has resulted in denial of access."cr)
call PutLog('No Voice number, Booting user 'fname,10,10)
'Set bootuser TRUE'
call cleanup
exit
end
if isdistant then do
phonenumber=wpl_prompt(120," Enter access number: ")
if left(phonenumber,1)~="0" | ~finduser(phonenumber,'G') then do
call Send(" Invalid access number, sorry"cr)
return 0
end
if ~getpassword(password) then do
call send(cr||cr'Too bad'cr)
call PutLog(fname ' bad LD password',10,10)
'RexxMSG NY LOGPROC "PutLine 'l_mailer'wplstat$(line) $(p.password) BAD"'
call cleanup
exit
end;else do
status=fname' verified'
'RexxMSG NY LOGPROC "PutLine 'l_mailer'wplstat$(line) $(p.status)' status' $(p.password) OK"'
call PutLog(status,10,10)
return 1
end
end;else do
phonenumber=""
do i=1 to retries
resp=compress(wpl_prompt(120," Enter your local phone number: "),'- ')
if ~datatype(resp,'NUMERIC') then do
call Send(' Wierd number, 'retries-i' trys left'cr)
iterate
end
if length(resp)~=7 | substr(resp,2,2)="11" | left(resp,1)="0" then do
call Send(' Illegal, Invalid or Long Distance number, 'retries-i' trys left'cr)
call send(' You think I am crazy enough to call you Long Distance? Get Real!'cr)
iterate
end;else do
phonenumber=resp
leave
end
end
if phonenumber="" then do
call send(' You blew your chance!'cr)
call send(' You may still use GRAB, but you will limited in number of files'cr)
call send(' and total bytes you can download'cr)
return 0
end
if finduser(phonenumber,'G') then call send(' You have already selected a password.'cr' If you have forgotten your password, leave me a NOTE with your phone number.'cr)
else do
call send(' Opening new user account'cr)
if ~set_password() then do
call send(' You blew your chance!'cr)
return 0
end
end
call Send(" The system will call you back in a few moments. Your should enable"cr)
call Send(" autoanswer with ATS0=1 or type ATA when you see the RING."cr)
call Send(" You must enter your password when asked."cr)
if upper(wpl_prompt(30," The system will now hangup and call you back at "phonenumber", OK? (Y/n) "))="N" then do
call send(' You blew your chance'cr)
return 0
end
pnum="ATDT"phonenumber"|"
do i=1 to retries
status='CBV Dialing 'fname', try:'i
'RexxMSG NY LOGPROC "PutLine 'l_mailer'wplstat$(line) $(p.status)' status '$(p.number)' phonenumber '$(p.response)"'
call PutLog(status,10,10)
call delay(60)
if mdmcmd(30,'$(hangupstring)','OK') then do
call delay(60)
if mdmcmd(5,'$(initstring)','OK') then do
call delay(60)
if mdmcmd(120,pnum,'CONNECT') then do
'ModemClear'
status='Reconnected to 'fname' on try 'i', getting password'
'RexxMSG NY LOGPROC "PutLine 'l_mailer'wplstat$(line) $(p.status)' status '$(p.response) CONNECT"'
call PutLog(status,10,10)
if ~getpassword(password) then do
call send(cr||cr'Too bad'cr)
call PutLog(fname ' bad password',10,10)
'RexxMSG NY LOGPROC "PutLine 'l_mailer'wplstat$(line) $(p.password) BAD"'
call cleanup
exit
end;else do
status=fname' verified'
'RexxMSG NY LOGPROC "PutLine 'l_mailer'wplstat$(line) $(p.status)' status' $(p.password) OK"'
call PutLog(status,10,10)
return 1
end
end;else do
'Print "No response to dial\n"'
iterate
end
end;else do
'Print "Cannot reinit\n"'
iterate
end
end;else do
'Print "Cannot hangup\n"'
iterate
end
end
call PutLog('Unable to contact 'fname' @ 'phonenumber,10,10)
if ~open('um',"LOG:RFSacct/h/"tdomain".0.0.0.0.m",'A') then do
if ~open('um',"LOG:RFSacct/h/"tdomain".0.0.0.0.m",'W') then do
call putlog('Unable to inform user',10,10)
call cleanup
exit 0
end
end
end
call writeln('um'," Call Back Verifier Report on "date()" at "time())
call writeln('um'," After three attempts, we were unable to connect with you at" phonenumber".")
call writeln('um'," Either the number given was incorrect or is Long Distance from this exchange.")
call writeln('um'," If you are a LONG-DISTANCE caller you may make an arrangement with the")
call writeln('um'," Sysop for a password to enable more generous limits.")
call close('um')
call PutLog('Posted failure to connect message to user',10,10)
call cleanup
exit 0
mdmcmd:
'Clear event lastresponse'
'ModemClear'
'SmartSend 'arg(2)
call delay(100)
getprogress:
'GetResponse' arg(1)
'String $(event) $(lastresponse)'
x=upper(RESULT)
if word(x,1)~="PROGRESS" then x=word(x,1)
else do
if word(x,2)~="CONNECT" then signal getprogress
else x="CONNECT"
end
return(x==arg(3))
getpassword:
'ModemClear'
call delay(60)
call send(cr||cr' CallBack Verifier 'sv||cr)
do i=1 to retries
if lostcarrier('password request') then exit
if upper(wpl_prompt(120," Password: "))~=arg(1) then call send(' Wrong, 'retries-i' trys left'cr)
else do
call send(' Ok!'cr)
call SetVar("VUSER"port,'TRUE',"G")
return 1
end
end
return 0
set_password:
call send(' You must select a password to use everytime you wish to be verified'cr)
call send(' If you forget your password, you will not get extended access'cr)
do i=1 to retries
password=""
if lostcarrier('new password request') then exit
resp=upper(wpl_prompt(120," Select an 8 character Password: "))
if length(resp) ~=8 then do
call send(' Invalid format, 'retries-i' trys left'cr)
call send(' User failed counting test'cr)
end;else do
password=strip(resp)
call delay(20)
if upper(wpl_prompt(120,' Ok, enter it again:'))~=password then do
call send(' Does not match!'cr)
call send(' User failed memory test.'cr)
iterate
end;else do
call saveuser('G')
call PutLog(fname' @ 'phonenumber' selected a password',10,10)